try:
    while True:
        age = int(input('输入年龄:'))
        if 16 <= age <=25:
            break

    print('age=',age)
except Exception:
    print("输入错误")